package io.fivefire.base.common.context;

/**
 * <p>获取当前登录用户的id </p>
 *
 * @author huijun
 * @create 2018-05-27 上午 10:39
 **/
public class CurrentLoginUserContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal();

    public CurrentLoginUserContext() {
    }

    public static Long getUserId() {
        return threadLocal.get();
    }

    public static void setUserId(Long userId) {
        threadLocal.set(userId);
    }

}
